Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Patch pedersen hash with cpp native implementation #110

Merged
merged 1 commit into from
May 27, 2022

Conversation

THenry14
Copy link
Contributor

Usage related changes

Improve performance by patching pedersen hash calculating function from cairo-lang with c++ native code.

Development related changes

Checklist:

  • Performed a self-review of the code
  • Rebased to the base branch
  • Documented the changes
  • Updated the tests

Additional details

This is a monkey patch we should eventually get rid of (when the change is upstreamed to cairo-lang itself). Using the cpp implementation of pedersen hash can yield ~30% improvement in execution time, especially for bigger, more complex contracts.

@FabijanC FabijanC self-requested a review May 27, 2022 07:34
Copy link
Collaborator

@FabijanC FabijanC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can you show one such example where the performance is improved?
  2. Can you make sure the tests are passing for you locally? You can follow .circleci/config.yml test steps to install and generate everything needed.

@THenry14 THenry14 force-pushed the szymczyk/crypto-cpp branch from 500427e to dc2293f Compare May 27, 2022 10:33
@THenry14
Copy link
Contributor Author

  1. Can you show one such example where the performance is improved?

  2. Can you make sure the tests are passing for you locally? You can follow .circleci/config.yml test steps to install and generate everything needed.

1). I have tested changes on:

2). I can confirm tests are passing on my linux 64bit machine; I have however some issues running on mac m1 (I have tried to run the tests without my changes - from freshly cloned repo on master branch, but they also fail, so I don’t think this is conected to the change)

@FabijanC FabijanC self-requested a review May 27, 2022 10:38
@FabijanC FabijanC merged commit 9692766 into 0xSpaceShard:master May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants